/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package simplemetrosystem.view.menu;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JMenuItem;
import simplemetrosystem.control.Calculation.ModelManager;
import simplemetrosystem.model.charlanguage.NameMap;
import simplemetrosystem.view.MetroFrame;

/**
 *
 * @author Eric Qian
 */
public class ModelEditItem extends JMenuItem {

    /**
     * 
     * @param frame
     */
    public ModelEditItem(MetroFrame frame) {
        this.frame = frame;
        nameMap = NameMap.getInstance();
        this.setText(nameMap.getName("Edit Model"));
        addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                ModelManager.getInstance().setModel(false);
            }
        });
    }
    private MetroFrame frame;
    private NameMap nameMap;
}
